#ifndef	__CACHED_HASH_H__
#define	__CACHED_HASH_H__

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <sys/types.h>
#include <string>
#include <map>

using namespace std;

class CachedHash
{
   pgpHashAlgo HashType;
   string CacheFileName;
   struct FileData
   {
      string Hash;
      time_t TimeStamp;
   };
   map<string, FileData> HashTable;

   public:

   bool HashForFile(string FileName, time_t TimeStamp, char *buf);

   CachedHash(pgpHashAlgo HType, string DirName, string Domain, string Suffix);
   ~CachedHash();
};

struct HashCaches {
   CachedHash *md5;
   CachedHash *blake2b;
};

#endif	/* __CACHED_HASH_H__ */

// vim:sts=3:sw=3
